﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Vroom.TableListener.Utils
{
	public static class RxExtensions
	{
		public static void Dump<T>(this IObservable<T> source, string name)
		{
			source.Subscribe
			(
				i  => Debug.WriteLine("{0}-->{1}", name, i),
				ex => Debug.WriteLine("{0} failed-->{1}", name, ex.Message),
				() => Debug.WriteLine("{0} completed", name)
			);
		}
	}
}
